<?php

class BaseAdminController extends Controller {
        public $layout='/layouts/main';
        
        public function filters()
	{
		return array(
			'accessControl', // perform access control for CRUD operations
		);
	}
        
        public function accessRules()
	{
                $user=$this->getLoginUser();
                
                if($user && $user->roleId==Role::ROLE_ADMIN){
                        return array();
                }else{
                        return array(
                                'allow'=>array(''),
                                'deny'=>array('users' => array('*', '?', '@'))
                        );
                }
	}
}

?>
